fix: provision dependency-only directories safely - #242
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Fix the shared worktree-provisioning classifier in bin/fm-provision-lib.sh so a directory carrying only a dependency list installs those dependencies and is never treated as a runnable package. Establish and fix the actual failing command rather than assuming the reported requirements.txt diagnosis; preserve an honest capability-gap launch when safe dependency-only installation is unsupported. Cover the direct execution path with regression tests that prove requirements-only directories never become package installs and inspect sibling lockfile-only manager cases. Confirm that pyproject.toml without a dependency lock/list, ambiguous managers, below-scan-depth, and over-budget outcomes are deliberate separate policies. Do not silently change the fleet-wide component budget; include a reasoned, evidence-based recommendation for relvino's observed 23 components in the completion report, with any proposed default change left as a separate change. Validate review, tests, documentation, lint, push, PR, and CI to green.
What Changed
requirements.txtand resolvable standaloneuv.lockfiles as dependency lists without installing their directories as packages; report unsupported Python and JavaScript lockfile-only cases as capability gaps.Risk Assessment
✅ Low: The change is well-bounded, preserves requirements.txt precedence and fleet-wide limits, and conservatively converts unsupported standalone lock shapes into explicit capability gaps.
Testing
The reported baseline and focused end-to-end CLI tests all passed, demonstrating dependency-only provisioning, separate pyproject/manager/depth/budget gap policies, guarded Herdr drift classification, and live Herdr spawn/event behavior; reviewer-visible CLI transcripts were captured and the worktree remained clean.
Evidence: Provisioning end-to-end transcript
Evidence: Herdr tripwire behavior transcript
Evidence: Live Herdr backend smoke transcript
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 1 issue found → auto-fixed (2) ✅
bin/fm-provision-lib.sh:1534- The new standalone-uv.lock path creates a synthetic pyproject containing only the root name/version, then runsuv sync --frozen. A real lock generated from a project with dependencies will not match that synthetic metadata, so uv refuses to update under--frozen; the test fake only checks that pyproject.toml exists and therefore misses the real failure. This also leaves a directory containing both requirements.txt and a standalone uv.lock on the broken uv-lock path because detection prioritizes uv.lock. Preserve the required capability-gap launch for standalone locks unless matching project metadata can be reconstructed safely, and prefer the supported requirements installer when requirements.txt is present without pyproject.toml.🔧 Fix: Prefer requirements over standalone uv locks
1 error still open:
bin/fm-provision-lib.sh:1535- Standalone locks are classified as supported after validating only the root entry. A valid lock with rootsource = { virtual = "." }and a dependency sourced from a relative workspace/path remains reachable: copying the lock to a cache directory changes the relative-path base, while--no-install-workspacemay omit that dependency entirely. The probe does not verify locked packages foruv-lock, so provisioning can either fail the whole spawn or report success with an incomplete environment instead of the required honest capability gap. At the classifier boundary, reject locks containing non-root relative/workspace sources unless their original resolution semantics can be preserved safely.🔧 Fix: Reject path-dependent standalone uv locks
✅ Re-checked - no issues remain.
🔧 **Test** - 1 issue found → auto-fixed (7) ✅
if [ "${FM_AZURE_VALIDATION_CELL:-0}" = 1 ]; then exec "$FM_AZURE_VALIDATION_SHARD_BRIDGE" behavior --count "${FM_AZURE_VALIDATION_SHARD_COUNT:-8}"; else exec bin/fm-no-mistakes-test-command.sh; fi🔧 Fix: Isolate watcher guard configuration fixture
1 error still open:
if [ "${FM_AZURE_VALIDATION_CELL:-0}" = 1 ]; then exec "$FM_AZURE_VALIDATION_SHARD_BRIDGE" behavior --count "${FM_AZURE_VALIDATION_SHARD_COUNT:-8}"; else exec bin/fm-no-mistakes-test-command.sh; fi🔧 Fix: Isolate watcher fixtures from live configuration
1 error still open:
if [ "${FM_AZURE_VALIDATION_CELL:-0}" = 1 ]; then exec "$FM_AZURE_VALIDATION_SHARD_BRIDGE" behavior --count "${FM_AZURE_VALIDATION_SHARD_COUNT:-8}"; else exec bin/fm-no-mistakes-test-command.sh; fi🔧 Fix: Isolate test homes and reap Herdr event reader
1 error still open:
if [ "${FM_AZURE_VALIDATION_CELL:-0}" = 1 ]; then exec "$FM_AZURE_VALIDATION_SHARD_BRIDGE" behavior --count "${FM_AZURE_VALIDATION_SHARD_COUNT:-8}"; else exec bin/fm-no-mistakes-test-command.sh; fi🔧 Fix: Isolate arm policy fixture home
1 error still open:
if [ "${FM_AZURE_VALIDATION_CELL:-0}" = 1 ]; then exec "$FM_AZURE_VALIDATION_SHARD_BRIDGE" behavior --count "${FM_AZURE_VALIDATION_SHARD_COUNT:-8}"; else exec bin/fm-no-mistakes-test-command.sh; fi🔧 Fix: Confirm AFK failure was ambient Herdr interference
1 error still open:
if [ "${FM_AZURE_VALIDATION_CELL:-0}" = 1 ]; then exec "$FM_AZURE_VALIDATION_SHARD_BRIDGE" behavior --count "${FM_AZURE_VALIDATION_SHARD_COUNT:-8}"; else exec bin/fm-no-mistakes-test-command.sh; fi🔧 Fix: Confirm bounded I/O cleanup passes focused stress
1 error still open:
if [ "${FM_AZURE_VALIDATION_CELL:-0}" = 1 ]; then exec "$FM_AZURE_VALIDATION_SHARD_BRIDGE" behavior --count "${FM_AZURE_VALIDATION_SHARD_COUNT:-8}"; else exec bin/fm-no-mistakes-test-command.sh; fi🔧 Fix: Audit external Herdr churn while preserving attributed tripwire
✅ Re-checked - no issues remain.
if [ "${FM_AZURE_VALIDATION_CELL:-0}" = 1 ]; then exec "$FM_AZURE_VALIDATION_SHARD_BRIDGE" behavior --count "${FM_AZURE_VALIDATION_SHARD_COUNT:-8}"; else exec bin/fm-no-mistakes-test-command.sh; fiOuter-executor baseline:if [ "${FM_AZURE_VALIDATION_CELL:-0}" = 1 ]; then exec "$FM_AZURE_VALIDATION_SHARD_BRIDGE" behavior --count "${FM_AZURE_VALIDATION_SHARD_COUNT:-8}"; else exec bin/fm-no-mistakes-test-command.sh; fi(reported successful)bash tests/fm-spawn-provision.test.shbash tests/fm-herdr-lab.test.shbash tests/fm-backend-autodetect-smoke.test.shbash tests/fm-backend-herdr-eventwait-smoke.test.shVerifiedgit status --shortremained empty after testing✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.